Digital subtraction angiography (DSA) is an X-ray imaging method, which removes background structures from an X-ray image. A non-contrast image (mask image) containing the background structures is acquired from a patient. Then, a contrast medium is injected into the patient, and an X-ray image is made of blood vessels containing the contrast medium. The non-contrast image is subtracted from an X-ray image of the blood vessels with contrast agent injected. In this way, there is an improved contrast between blood vessels and their background. U.S. Pat. No. 4,729,379 discusses digital subtraction angiography. However, the DSA-technique has been shown to be less useful when there are a number of independent motions in the imaged region of interest of the patient. Techniques for providing DSA can, therefore, be further improved.